/*
 * paymentBO.java
 *
 * Created on March 17, 2007, 2:14 PM
 */

package edu.byu.isys413.mystuff;

import java.util.Date;

/**
 *
 * @author Sam Griffiths
 */
public abstract class revaBO {
    
    //initializes variables for the rev Business OBject
    private String revid;
    private double price;
    private String description;
    private String type;
    private boolean dirty = false;
    private boolean alreadyInDatabase = false;
    
    /** Creates a new instance of revaBO */
    public revaBO() {
    }
     
    //creates a new revaBO with id initialized
    public revaBO(String revid) {
        this.revid = revid;
    }
    
    //sets id
    public void setId(String revid){
        this.revid = revid;
    }
    
    //return revID
    public String getRevenueId() {
        return revid;
    }

    //returns revenueSource price
    public double getPrice() {
        return price;
    }

    //set's price of revenue Source
    public void setPrice(double price) {
        this.price = price;
        setDirty(true);
    }
    
    public String getType(){
        return type;
    }
    
    public void setType(String type){
        this.type = type;
        setDirty(true);
    }

    //returns revaBO as a string
    public String toString(){
        return "Revenue id : "+ this.getRevenueId()+" \n"+
               "Price      : "+ this.getPrice()+" \n"+
               "Type       : "+ this.getType() +"\n";
    }

    //returns true if object has been changed since read or saved
    public boolean isDirty() {
        return dirty;
    }

    //sets dirty
    public void setDirty(boolean dirty) {
        this.dirty = dirty;
    }

    //returns if object is already in the database
    public boolean isAlreadyInDatabase() {
        return alreadyInDatabase;
    }

    //sets if object is already in database
    public void setAlreadyInDatabase(boolean alreadyInDatabase) {
        this.alreadyInDatabase = alreadyInDatabase;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}